package com.llly.client;

import com.github.pagehelper.Page;
import com.llly.client.impl.OrderFeignClientImpl;
import com.llly.pojo.Easybuy_order;
import com.llly.pojo.Easybuy_order_detail;
import com.llly.pojo.Easybuy_product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Component
@FeignClient(name = "provider9091",fallback = OrderFeignClientImpl.class)
public interface OrderFeignClient {
    //根据用户id查询订单
    @RequestMapping("/showOrder")
    public Map<String,Object> ShowOrder(@RequestParam Integer userId, @RequestParam Integer PageIndex);
    @RequestMapping("/delOrder")
    public int delOrder(@RequestParam String serialNumber);

    @RequestMapping("/addOrder")
    public int addOrder(@RequestBody Easybuy_order easybuy_order) ;

    @RequestMapping("/addOrderDetail")
    public int addOrderDetail(@RequestBody Easybuy_order_detail easybuy_order_detail) ;


    @RequestMapping("/delAllOrder")
    public int delAllOrder(@RequestParam String loginName);

}
